package com.neusoft.tijiancms.controller;

import com.neusoft.tijiancms.po.Overallresult;
import com.neusoft.tijiancms.service.OverallresultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OverallresultController")
public class OverallresultController {
    @Autowired
    private OverallresultService overallresultService;


    @RequestMapping("/listOverallResultByOrderId")
    public List<Overallresult> listOverallResultByOrderId(@RequestBody Overallresult overallresult){
        return  overallresultService.listOverallResultByOrderId(overallresult.getOrderId());
    }

    @RequestMapping("/saveOverallResult")
    public int saveOverallResult(@RequestBody Overallresult overallresult){
        return overallresultService.saveOverallResult(overallresult);
    }

    @RequestMapping("/updateOverallResult")
    public int updateOverallResult(@RequestBody Overallresult overallresult){
        return overallresultService.updateOverallResult(overallresult);
    }

    @RequestMapping("/removeOverallResult")
    public int removeOverallResult(@RequestBody Overallresult overallresult){
        return overallresultService.removeOverallResult(overallresult);
    }
}
